#content 就是那就话，内存中的编码方式:Unicode
# content=input('>>>')
# print(content,type(content))

#bytes 与str的方法差不多,内存中的编码方式:非Unicode
b=b'hello'
print(b,type(b))

s1='中国'
'''
b=b'中国'
print(b)#SyntaxError: bytes can only contain ASCII literal characters
'''
#b=s1.encode('utf-8')#b'\xe4\xb8\xad\xe5\x9b\xbd'
b=b'\xe4\xb8\xad\xe5\x9b\xbd'
print(b.decode())

#str--->bytes
s1='中国'
b1=s1.encode('utf-8')
print(b1,type(b1))
#bytes--->str
b1=b'\xe4\xb8\xad\xe5\x9b\xbd'
s2=b1.decode('utf-8')
print(s2)

s1='中国'
b1=s1.encode('gbk')
print(b1,type(b1))#b'\xd6\xd0\xb9\xfa' <class 'bytes'>

#gbk--->utf-8
b1=b'\xd6\xd0\xb9\xfa'
s=b1.decode('gbk')
print(s)
b2=s.encode('utf-8')
print(b2)

l1=[5,]
l1+=[3]
print(l1)
l1=[5,]
print(l1)






